package assignment_cp3120.dataObjects;

import java.sql.Date;
import java.sql.Time;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 * An object to hold all the information about a single flight.
 * Holds id, departure id, destination id,flight date, depature time and arrival time.
 * Also has getters and setters for these variables
 * @author Richard Irons
 */
public class Flight {
    private String flight_id;
    private String dep_id;
    private String dest_id;
    private Date flight_date;
    private Time dep_time;
    private Time arr_time;
    private int capacity;
    private int flight_price;
    
    public static final int DATA_FIELDS = 7;

    /**
     * Set arr_time to the input value
     * @param arr_time
     * this.arr_time = arr_time
     */
    public void setArr_time(Time arr_time) {
        this.arr_time = arr_time;
    }
    /**
     * Set dep_id to the input value
     * @param dep_id
     * this.dep_id = dep_id
     */
    public void setDep_id(String dep_id) {
        this.dep_id = dep_id;
    }
    /**
     * Set arr_time to the input value
     * @param dep_time
     * this.dep_time = dep_time
     */
    public void setDep_time(Time dep_time) {
        this.dep_time = dep_time;
    }
    /**
     * Set arr_time to the input value
     * @param dest_id
     * this.dest_id = dest_id
     */
    public void setDest_id(String dest_id) {
        this.dest_id = dest_id;
    }
    /**
     * Set arr_time to the input value
     * @param flight_date
     * this.flight_date = flight_date
     */
    public void setFlight_date(Date flight_date) {
        this.flight_date = flight_date;
    }
    /**
     * Set arr_time to the input value
     * @param flight_id
     * this.flight_id = flight_id
     */
    public void setFlight_id(String flight_id) {
        this.flight_id = flight_id;
    }
    /**
     * Get arr_time
     * @return
     * arr_time
     */
    public Time getArr_time() {
        return arr_time;
    }
    /**
     * Get dep_id
     * @return
     * dep_id
     */
    public String getDep_id() {
        return dep_id;
    }
    /**
     * Get dep_time
     * @return
     * dep_time
     */
    public Time getDep_time() {
        return dep_time;
    }
    /**
     * Get dest_id
     * @return
     * dest_id
     */
    public String getDest_id() {
        return dest_id;
    }
    /**
     * Get flight_date
     * @return
     * flight_date
     */
    public Date getFlight_date() {
        return flight_date;
    }
    /**
     * Get flight_id
     * @return
     * flight_id
     */
    public String getFlight_id() {
        return flight_id;
    }
    /**
     * Get the price of this flight
     * @return
     * price
     */
    public int getFlight_price() {
        return flight_price;
    }
    /**
     * set the price of this flight
     * @param flight_price
     * price to be set
     */
    public void setFlight_price(int flight_price) {
        this.flight_price = flight_price;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }
    
    @Override public String toString() {
        return  flight_id+
                ", DepID:" +dep_id+
                ", DestID:"+dest_id+
                ", Date:"+flight_date.toString()+
                ", DTm:"+dep_time.toString()+
                ", ATm:"+arr_time.toString()+
                ", Price$"+Integer.toString(flight_price);
    }    
}
